package pres.man.interview.thread;

import java.util.concurrent.BlockingQueue;
import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * 实现ThreadPoolExecutor terminated()
 *
 * @author MAN
 * @date 2020-12-07-17:49
 */
public class DefaultThreadPoolExecutor extends ThreadPoolExecutor {
    public DefaultThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, RejectedExecutionHandler handler) {
        super(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue, handler);
    }

    @Override
    protected void terminated() {
        System.out.println("aaaaa i am terminated");
        super.terminated();
    }
}
